Skip to content

meta(changelog): Update changelog for 10.5.0 #17390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 12, 2025
Merged

Conversation

andreiborza
Copy link
Member

No description provided.

mydea and others added 9 commits August 11, 2025 15:00
…17373)

Add tests that definitely show:
1. How get and post spans are captured
2. How URLs are handled with params and fragments

This should make
#17371 much easier to
verify.
[Gitflow] Merge master into develop
Introduces new E2E tests for AWS Lambda that run in a Lambda runtime
using AWS SAM and the AWS CDK, inspired by
https://vanguard.getsentry.net/p/cm7ysk0mz0000c7sk3e2qx3sx
Bumps [@sentry/cli](https://github.com/getsentry/sentry-cli) from 2.50.2
to 2.51.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-cli/releases"><code>@​sentry/cli</code>'s
releases</a>.</em></p>
<blockquote>
<h2>2.51.1</h2>
<h3>Various fixes &amp; improvements</h3>
<ul>
<li>fix(logs): Mark <code>logs</code> command as beta (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2690">#2690</a>)
by <a
href="https://github.com/szokeasaurusrex"><code>@​szokeasaurusrex</code></a></li>
</ul>
<h2>2.51.0</h2>
<h3>Logs command</h3>
<p>This release introduces a <a
href="https://redirect.github.com/getsentry/sentry-cli/pull/2664">new
<code>sentry-cli logs list</code> command</a>, which lists your Sentry
logs. For more details, see <code>sentry-cli logs list
--help</code>.</p>
<p>Please note: if you receive a <code>403</code> error when using the
new command, you may need to generate a new auth token with different
permissions. You can do this by navigating to <em>Settings</em> →
<em>Developer Settings</em> → <em>Personal Tokens</em> in Sentry. On the
<em>Personal Tokens</em> page, generate a token with
<code>org:read</code> scope, and pass this to the command using
<code>--auth-token</code> or by setting the
<code>SENTRY_AUTH_TOKEN</code> environment variable.</p>
<h3>Various fixes &amp; improvements</h3>
<ul>
<li>fix(js): Stop calling <code>releases files upload-sourcemaps</code>
(<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2676">#2676</a>)
by <a
href="https://github.com/szokeasaurusrex"><code>@​szokeasaurusrex</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md"><code>@​sentry/cli</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>2.51.1</h2>
<h3>Various fixes &amp; improvements</h3>
<ul>
<li>fix(logs): Mark <code>logs</code> command as beta (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2690">#2690</a>)
by <a
href="https://github.com/szokeasaurusrex"><code>@​szokeasaurusrex</code></a></li>
</ul>
<h2>2.51.0</h2>
<h3>Logs command</h3>
<p>This release introduces a <a
href="https://redirect.github.com/getsentry/sentry-cli/pull/2664">new
<code>sentry-cli logs list</code> command</a>, which lists your Sentry
logs. For more details, see <code>sentry-cli logs list
--help</code>.</p>
<p>Please note: if you receive a <code>403</code> error when using the
new command, you may need to generate a new auth token with different
permissions. You can do this by navigating to <em>Settings</em> →
<em>Developer Settings</em> → <em>Personal Tokens</em> in Sentry. On the
<em>Personal Tokens</em> page, generate a token with
<code>org:read</code> scope, and pass this to the command using
<code>--auth-token</code> or by setting the
<code>SENTRY_AUTH_TOKEN</code> environment variable.</p>
<h3>Various fixes &amp; improvements</h3>
<ul>
<li>fix(js): Stop calling <code>releases files upload-sourcemaps</code>
(<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2676">#2676</a>)
by <a
href="https://github.com/szokeasaurusrex"><code>@​szokeasaurusrex</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/8aad1359f66da1e50f331685422d0e4250257f34"><code>8aad135</code></a>
meta: Update CHANGELOG.md</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/a9b642b45bcce35df381e57305d4a2d35c4ff0d8"><code>a9b642b</code></a>
release: 2.51.1</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/8ff1b1c8fdcef02170db581f643f4447ef84505c"><code>8ff1b1c</code></a>
revert: &quot;build: Pin Rust toolchain minor version (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2687">#2687</a>)&quot;
(<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2692">#2692</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/c5eeb6e98357abe7aae763fc9db2e06b6899eff4"><code>c5eeb6e</code></a>
fix(logs): Mark <code>logs</code> command as beta (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2690">#2690</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/657ede2269235b6441cc60f720ceecdec8d11168"><code>657ede2</code></a>
test: Test <code>logs</code> help message (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2689">#2689</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/1dcc54dc77b95aa5d13a646de2c1f9f4e8d24da5"><code>1dcc54d</code></a>
build: Pin Rust toolchain minor version (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2687">#2687</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/2a127c8e22f6163ed4f0a82f7376189dbd485610"><code>2a127c8</code></a>
chore: Fix latest clippy lints (<a
href="https://redirect.github.com/getsentry/sentry-cli/issues/2684">#2684</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/e986daa8c094dd81509c338b1681841b8d4fe8fd"><code>e986daa</code></a>
Merge branch 'release/2.51.0'</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/81d4eb13f756a804c8439e801795cf3b4e11fc39"><code>81d4eb1</code></a>
meta: Update CHANGELOG.md</li>
<li><a
href="https://github.com/getsentry/sentry-cli/commit/b01f97c79d0ac43996200d21ceb8f9569c43b9fb"><code>b01f97c</code></a>
release: 2.51.0</li>
<li>Additional commits viewable in <a
href="https://github.com/getsentry/sentry-cli/compare/2.50.2...2.51.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@sentry/cli&package-manager=npm_and_yarn&previous-version=2.50.2&new-version=2.51.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Before submitting a pull request, please take a look at our

[Contributing](https://github.com/getsentry/sentry-javascript/blob/master/CONTRIBUTING.md)
guidelines and verify:

- [x] If you've added code that should be tested, please add tests.
- [x] Ensure your code lints and the test suite passes (`yarn lint`) &
(`yarn test`).

---

closes #15142 

When using `ExtraErrorDataIntegration`, `error.cause` serializes with
`.toString()` which is not very informative considering the purpose of
the integration.

This PR improves `error.cause` handling in `ExtraErrorDataIntegration`
by recursing the `_extractErrorData` for a single cause depth. To match
the outer structure and provide more information the cause object is
wrapped with `[name]`.

The `.toString()` serialized data is gone now but if we are using
`LinkedErrorsIntegration` the string message will still be visible.

Since these changes are useful enough, I think more detailed
specifications (like cause recursion) could be addressed by future PRs -
open to suggestions.


**Before:**
```javascript
// error.cause was serialized as: "SyntaxError: bar"
{
  TypeError: {
    cause: "SyntaxError: bar"  // Just toString() output
  }
}
```

**After:**
```javascript
// error.cause now includes full error data extraction
{
  TypeError: {
    cause: {
      SyntaxError: {
        baz: 42,
        foo: "aaaa...a...",
      }
    }
  }
}
```
…ge (#17331)

resolves #17332

Node.js has a
[`SystemError`](https://nodejs.org/api/errors.html#class-systemerror)
error class.

This error type contains numerous properties which can be useful for
debugging but it also includes many of them in the error message which
stops fingerprinting from grouping these errors.

This PR adds a default enabled integration that copies the error
properties to a new context and strips paths from the error message.

If the top-level `sendDefaultPii` is not enabled, the `path` and `dest`
properties will not be included.
….0.2 to 4.1.0 (#17383)

Bumps
[@sentry/rollup-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins)
from 4.0.2 to 4.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/releases"><code>@​sentry/rollup-plugin</code>'s
releases</a>.</em></p>
<blockquote>
<h2>4.1.0</h2>
<ul>
<li>feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/786">#786</a></li>
<li>feat(core): Add flag for disabling sourcemaps upload <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/785">#785</a></li>
<li>fix(debugId): Add guards for injected code to avoid errors <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/783">#783</a></li>
<li>docs(options): Improve JSDoc for options <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/781">#781</a></li>
<li>feat(core): Expose method for injecting debug Ids from plugin
manager <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/784">#784</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md"><code>@​sentry/rollup-plugin</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>4.1.0</h2>
<ul>
<li>feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/786">#786</a></li>
<li>feat(core): Add flag for disabling sourcemaps upload <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/785">#785</a></li>
<li>fix(debugId): Add guards for injected code to avoid errors <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/783">#783</a></li>
<li>docs(options): Improve JSDoc for options <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/781">#781</a></li>
<li>feat(core): Expose method for injecting debug Ids from plugin
manager <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/784">#784</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/d76eb7034cefdbdc50f84ff1f6748007dffd4d67"><code>d76eb70</code></a>
release: 4.1.0</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/bab871bc4787386edcddb7953f7eb8d1697f2e86"><code>bab871b</code></a>
meta: Add changelog entry for 4.1.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/787">#787</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/9323c6549daf5fd22517c0c4f399bddaff284753"><code>9323c65</code></a>
feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/786">#786</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/add97e61d069a67b79dd4d1661e70b7ba5845041"><code>add97e6</code></a>
feat(core): Add flag for disabling sourcemaps upload (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/785">#785</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/c1441e809b7ce574512652ed1cc0f256a0d86f78"><code>c1441e8</code></a>
fix(debugId): Add guards for injected code to avoid errors (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/783">#783</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/40d1053afd61e1564a56e386353f96d47fe100f6"><code>40d1053</code></a>
docs(options): Improve JSDoc for options (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/781">#781</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/bf394f1374699caead8b3f25c5a5ae1e3863a63a"><code>bf394f1</code></a>
feat(core): Expose method for injecting debug Ids from plugin manager
(<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/784">#784</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/c15f9df84866113abf40c692274f693c7a8a869a"><code>c15f9df</code></a>
Merge branch 'release/4.0.2'</li>
<li>See full diff in <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/4.0.2...4.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@sentry/rollup-plugin&package-manager=npm_and_yarn&previous-version=4.0.2&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: s1gr1d <[email protected]>
@andreiborza andreiborza self-assigned this Aug 12, 2025
CHANGELOG.md Outdated
Comment on lines 15 to 24
<details>
<summary> <strong>Internal Changes</strong> </summary>
- chore(repo): Adjust "Publishing a Release" document to include internal changes section in changelog ([#17374](https://github.com/getsentry/sentry-javascript/pull/17374))
- test(aws): Run E2E tests with AWS SAM ([#17367](https://github.com/getsentry/sentry-javascript/pull/17367))
- test(node): Add tests for full http.server span attribute coverage ([#17373](https://github.com/getsentry/sentry-javascript/pull/17373))
</details>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't get formatted properly when rendering in GH. You might need to use <li> elements directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2025-08-12 at 15 59 22@2x

Looks like it worked on the previous changelog entry. I updated it to include linebreaks before and after though.

@andreiborza andreiborza force-pushed the prepare-release/10.5.0 branch from 053ccc2 to 2a2c4c4 Compare August 12, 2025 14:00
Copy link
Contributor

github-actions bot commented Aug 12, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.16 kB added added
@sentry/browser - with treeshaking flags 22.73 kB added added
@sentry/browser (incl. Tracing) 39.87 kB added added
@sentry/browser (incl. Tracing, Replay) 77.99 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.83 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 82.69 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 94.79 kB added added
@sentry/browser (incl. Feedback) 40.83 kB added added
@sentry/browser (incl. sendFeedback) 28.81 kB added added
@sentry/browser (incl. FeedbackAsync) 33.7 kB added added
@sentry/react 25.88 kB added added
@sentry/react (incl. Tracing) 41.86 kB added added
@sentry/vue 28.64 kB added added
@sentry/vue (incl. Tracing) 41.69 kB added added
@sentry/svelte 24.18 kB added added
CDN Bundle 25.66 kB added added
CDN Bundle (incl. Tracing) 39.76 kB added added
CDN Bundle (incl. Tracing, Replay) 75.82 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 81.27 kB added added
CDN Bundle - uncompressed 74.96 kB added added
CDN Bundle (incl. Tracing) - uncompressed 117.59 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.88 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.48 kB added added
@sentry/nextjs (client) 43.89 kB added added
@sentry/sveltekit (client) 40.32 kB added added
@sentry/node-core 47.99 kB added added
@sentry/node 147.02 kB added added
@sentry/node - without tracing 92.24 kB added added
@sentry/aws-serverless 103.67 kB added added

codyde and others added 2 commits August 12, 2025 16:11
## Problem

The Sentry MCP server instrumentation has several edge cases that can
cause runtime errors when working with `StreamableHTTPServerTransport`
and similar transport implementations. These issues occur during:

1. **Transport initialization** - when transport constructors are
undefined/null
2. **Session establishment** - when `sessionId` is undefined during MCP
initialization phases
3. **Span correlation** - when transport objects cannot be used as
WeakMap keys
4. **Type validation** - when invalid transport objects are passed to
correlation functions

## Solution

This PR adds defensive patches to handle these edge cases gracefully
while preserving existing functionality and maintaining backward
compatibility.

### Changes Made

#### 1. Transport Constructor Null Checks (`attributeExtraction.ts`)
```typescript
export function getTransportTypes(transport: MCPTransport): { mcpTransport: string; networkTransport: string } {
  // Handle undefined transport gracefully while preserving type detection
  if (\!transport || \!transport.constructor) {
    return { mcpTransport: 'unknown', networkTransport: 'unknown' };
  }
  const transportName = transport.constructor.name?.toLowerCase() || '';
  // ... rest of function
}
```

#### 2. Graceful sessionId Handling (`attributeExtraction.ts`) 
```typescript
export function buildTransportAttributes(
  transport: MCPTransport,
  extra?: ExtraHandlerData,
): Record<string, string | number> {
  // Gracefully handle undefined sessionId during MCP initialization
  // Respects client-provided sessions and waits for proper session establishment
  const sessionId = transport && 'sessionId' in transport ? transport.sessionId : undefined;
  // ... rest of function
}
```

#### 3. WeakMap Correlation Fallback System (`correlation.ts`)
```typescript
const transportToSpanMap = new WeakMap<MCPTransport, Map<RequestId, RequestSpanMapValue>>();

/**
 * Fallback span map for invalid transport objects
 * @internal Used when transport objects cannot be used as WeakMap keys
 */
const fallbackSpanMap = new Map<RequestId, RequestSpanMapValue>();

function getOrCreateSpanMap(transport: MCPTransport): Map<RequestId, RequestSpanMapValue> {
  // Handle invalid transport values for WeakMap while preserving correlation
  if (\!transport || typeof transport \!== 'object') {
    // Return persistent fallback Map to maintain correlation across calls
    return fallbackSpanMap;
  }
  // ... rest of function
}
```

### Testing

Added comprehensive test coverage for all edge cases:

- **attributeExtraction.test.ts**: Tests undefined/null transports,
constructor edge cases, sessionId handling
- **correlation.test.ts**: Tests WeakMap fallback scenarios, invalid
transport objects, correlation isolation

All tests pass and verify that the patches handle edge cases without
breaking existing functionality.

### Compatibility

- ✅ **Backward compatible** - No breaking changes to existing APIs
- ✅ **Non-invasive** - Only adds defensive checks, doesn't modify core
logic
- ✅ **Performance neutral** - Minimal overhead with early returns for
invalid cases
- ✅ **Type safe** - Maintains existing TypeScript contracts

### Impact

This fix prevents runtime errors in production environments when:
- MCP transports are not fully initialized
- Session establishment is in progress
- Invalid transport objects are passed to instrumentation functions
- Edge case transport implementations are used

The patches ensure reliable instrumentation while maintaining full
compatibility with existing MCP server implementations.

## Testing Instructions

1. The existing test suite continues to pass
2. New edge case tests verify defensive behavior
3. Real-world StreamableHTTPServerTransport usage is now more robust

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <[email protected]>
Co-authored-by: betegon <[email protected]>
Noticed locally that I sometimes got unexpected un-removed `tmp_xxx`
dirs in node-integration tests. After some debugging, I figured out the
reason: We clean the tmp dir up in `afterAll` of the test. However, if
all tests inside are skipped, `afterAll` is not executed. So if you run
tests in a filtered way - e.g. `yarn test -t "xxx"` - it would create
the tmp dirs, but not delete them.

This PR fixes this by moving the creation of the tmp dir into
`beforeAll`, which equally is not executed when all tests are skipped.
@andreiborza andreiborza force-pushed the prepare-release/10.5.0 branch from 2a2c4c4 to b750c2d Compare August 12, 2025 14:49
dependabot bot and others added 2 commits August 12, 2025 16:58
Bumps
[@sentry/webpack-plugin](https://github.com/getsentry/sentry-javascript-bundler-plugins)
from 4.0.2 to 4.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/releases"><code>@​sentry/webpack-plugin</code>'s
releases</a>.</em></p>
<blockquote>
<h2>4.1.0</h2>
<ul>
<li>feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/786">#786</a></li>
<li>feat(core): Add flag for disabling sourcemaps upload <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/785">#785</a></li>
<li>fix(debugId): Add guards for injected code to avoid errors <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/783">#783</a></li>
<li>docs(options): Improve JSDoc for options <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/781">#781</a></li>
<li>feat(core): Expose method for injecting debug Ids from plugin
manager <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/784">#784</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/blob/main/CHANGELOG.md"><code>@​sentry/webpack-plugin</code>'s
changelog</a>.</em></p>
<blockquote>
<h2>4.1.0</h2>
<ul>
<li>feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/786">#786</a></li>
<li>feat(core): Add flag for disabling sourcemaps upload <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/785">#785</a></li>
<li>fix(debugId): Add guards for injected code to avoid errors <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/783">#783</a></li>
<li>docs(options): Improve JSDoc for options <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/781">#781</a></li>
<li>feat(core): Expose method for injecting debug Ids from plugin
manager <a
href="https://redirect.github.com/gestsentry/sentry-javascript-bundler-plugins/pull/784">#784</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/d76eb7034cefdbdc50f84ff1f6748007dffd4d67"><code>d76eb70</code></a>
release: 4.1.0</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/bab871bc4787386edcddb7953f7eb8d1697f2e86"><code>bab871b</code></a>
meta: Add changelog entry for 4.1.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/787">#787</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/9323c6549daf5fd22517c0c4f399bddaff284753"><code>9323c65</code></a>
feat(deps): Bump <code>@​sentry/cli</code> to 2.51.0 (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/786">#786</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/add97e61d069a67b79dd4d1661e70b7ba5845041"><code>add97e6</code></a>
feat(core): Add flag for disabling sourcemaps upload (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/785">#785</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/c1441e809b7ce574512652ed1cc0f256a0d86f78"><code>c1441e8</code></a>
fix(debugId): Add guards for injected code to avoid errors (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/783">#783</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/40d1053afd61e1564a56e386353f96d47fe100f6"><code>40d1053</code></a>
docs(options): Improve JSDoc for options (<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/781">#781</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/bf394f1374699caead8b3f25c5a5ae1e3863a63a"><code>bf394f1</code></a>
feat(core): Expose method for injecting debug Ids from plugin manager
(<a
href="https://redirect.github.com/getsentry/sentry-javascript-bundler-plugins/issues/784">#784</a>)</li>
<li><a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/commit/c15f9df84866113abf40c692274f693c7a8a869a"><code>c15f9df</code></a>
Merge branch 'release/4.0.2'</li>
<li>See full diff in <a
href="https://github.com/getsentry/sentry-javascript-bundler-plugins/compare/4.0.2...4.1.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@sentry/webpack-plugin&package-manager=npm_and_yarn&previous-version=4.0.2&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@andreiborza andreiborza force-pushed the prepare-release/10.5.0 branch from b750c2d to e969998 Compare August 12, 2025 14:59
@andreiborza andreiborza merged commit ddcf6d8 into master Aug 12, 2025
355 of 358 checks passed
@andreiborza andreiborza deleted the prepare-release/10.5.0 branch August 12, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants